@import "reset-css/reset.css";
@import "./iconfont.css";
@import "./var.scss";
@import "./404_500.scss";
@import "./header.scss";
@import "./footer.scss";
@import "./toolbar.scss";
@import "./company-product.scss";
@import "../plugins/progress.scss";

html,
body {
  padding: 0;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
    Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
  font-size: 14px;
  background-color: #f2f2f2 !important;
  image-rendering: -moz-crisp-edges; /* Firefox */     
  image-rendering: -o-crisp-edges; /* Opera */      
  image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming) */ 
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor; /* IE (non-standard property) */

}

* {
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
}

html,
body,
#__next,
._next {
  height: 100%;
}

.page-content {
  height: auto;
  min-height: calc(100% - 415px);
}

header.header,
footer.footer {
  min-width: 1200px;
}

.max-content {
  width: 1200px;
  margin: 0 auto;
  position: relative;
  p {
    margin-bottom: 0;
  }
}

.pos-hidden{
  position: absolute;
  left: -9999px;
}

// 优惠券icon
.youhui,
.youhui-tj,
.youhui-zd,
.youhui-mj,
.youhui-yhq{
  position: relative;
  &::before {
    content: "";
    display: block;
    position: absolute;
    z-index: 11;
    min-width: 60px;
    padding: 4px 10px;
    font-size: 14px;
    color: #fff;
    text-align: center;
    border-radius: 0 0 10px 0;
  }
}
.youhui-zd {
  &::before {
    content: "早订优惠";
    background: linear-gradient(to right, #7ed790, #3fc377);
  }
}
.youhui-tj {
  &::before {
    content: "特价";
    background: linear-gradient(to right, #fe7f5b, #ff9a44);
  }
}
.youhui-mj {
  &::before {
    content: "满减";
    background: linear-gradient(to right, #fd9793, #fd6585);
  }
}
.youhui-yhq {
  &::before {
    content: "优惠券";
    background: linear-gradient(to right, #3cc7f9, #24dff2);
  }
}

// 购物车图标
.run-cart{
  position: absolute;
  z-index: 1002;
  width: 32px;
  height: 32px;
  background-image: url('~/public/imgs/cart/icon.png');
}

// loading
.global-loading {
  display: none;
  position: fixed;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.2);
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  .ant-spin {
    position: absolute;
    left: 50%;
    top: 45%;
    transform: translate(-50%, -50%);
  }
  &.loading {
    display: block;
  }
}

// 重写antd样式
body {
  overflow: auto!important;
  // carousel
  .ant-carousel .slick-dots li {
    width: 26px;
    height: 5px;
    background-color: #fff;
    button {
      height: 5px;
      cursor: default;
    }
    &.slick-active {
      width: 35px;
      button {
        background-color: $mainColor;
      }
    }
  }

  // form
  .ant-input:hover {
    border-color: $mainColor;
  }
  .ant-input:focus,
  .ant-input-focused,
  .ant-input-number:focus,
  .ant-input-number-focused {
    border-color: $mainColor;
    box-shadow: 0 0 5px 2px rgb(246,135,9,10%);
  }
  .ant-input-number-handler:hover .ant-input-number-handler-up-inner,
  .ant-input-number-handler:hover .ant-input-number-handler-down-inner {
    color: $mainColor;
  }
  .ant-input-number:hover,
  .ant-btn:active,
  .ant-btn:hover,
  .ant-btn:focus {
    color: $lightColor;
    border-color: $lightColor;
  }
  .ant-btn-primary,
  .ant-btn-primary:active {
    border-color: $mainColor;
    background: $mainColor;
  }
  .ant-btn-primary:hover,
  .ant-btn-primary:focus {
    color: #fff;
    border-color: $lightColor;
    background: $lightColor;
  }
  .ant-form-item {
    margin-bottom: 15px;
    &.ant-form-item-with-help {
      margin-bottom: 0;
    }
  }

  // checkbox/radio
  .ant-checkbox + span {
    padding-left: 3px;
  }
  .ant-checkbox-inner {
    width: 14px;
    height: 14px;
    &::after {
      left: 20.5%;
    }
  }
  .ant-checkbox-checked .ant-checkbox-inner{
    background-color: $mainColor;
    border-color: $mainColor;
  }
  .ant-checkbox-wrapper:hover .ant-checkbox-inner,
  .ant-checkbox:hover .ant-checkbox-inner,
  .ant-checkbox-input:focus + .ant-checkbox-inner,
  .ant-radio-checked .ant-radio-inner,
  .ant-radio:hover .ant-radio-inner,
  .ant-radio-input:focus + .ant-radio-inner {
    border-color: $mainColor;
  }
  .ant-checkbox-checked::after,
  .ant-radio-checked::after {
    border-color: $mainColor;
  }
  .ant-radio-inner::after{
    background-color: $mainColor;
  }

  .ant-rate{
    color: $mainColor;
  }
  .ant-upload.ant-upload-select-picture-card{
    background-color: #fff;
    &:hover{
      border-color: $mainColor;
    }
  }
  
  // 面包屑
  .bread-crumb > .ant-breadcrumb {
    padding: 6px 0;
    line-height: 22px;
    color: #000;
    a:hover {
      color: #000;
      text-decoration: underline;
    }
  }
  // 分页
  .list-pagination {
    margin: 10px 0;
    height: 35px;
    text-align: right;
    .ant-pagination-options {
      display: none;
    }
    .ant-pagination-prev,
    .ant-pagination-next,
    .ant-pagination-jump-prev,
    .ant-pagination-jump-next,
    .ant-pagination-item {
      margin-right: 1px;
      border: none;
      border-bottom: 3px solid #e5e5e5;
      color: #252525;
    }
    .ant-pagination-prev .ant-pagination-item-link,
    .ant-pagination-next .ant-pagination-item-link {
      border: none;
    }
    .ant-pagination-prev button,
    .ant-pagination-next button {
      .anticon {
        font-size: 14px;
      }
    }
    .ant-pagination-item:focus-visible a,
    .ant-pagination-item:hover a,
    .ant-pagination-prev:hover .ant-pagination-item-link,
    .ant-pagination-next:hover .ant-pagination-item-link {
      color: $mainColor;
    }
    .ant-pagination-item-active a,
    .ant-pagination-item-active {
      color: #fff;
      background-color: $mainColor;
      &:hover {
        color: #fff;
      }
    }
    .ant-pagination-total-text {
      color: #999;
    }
  }

  // 锚点导航
  .anchor-nav,
  .ant-anchor-wrapper,
  .ant-anchor {
    position: relative;
    height: 50px;
    background-color: #fff;
  }
  .anchor-nav {
    margin-left: 0;
    margin-bottom: 15px;
    font-size: 16px;
    .ant-affix {
      box-shadow: 0px 0px 5px 0px #ddd;
      .scroll-order-btn {
        display: block;
      }
    }
    .ant-anchor-wrapper {
      overflow: visible;
      margin-left: 0;
      padding-left: 0;
    }
    .ant-anchor-ink {
      display: none;
    }
    .ant-anchor-link {
      position: absolute;
      top: 0;
      left: 0;
      width: 120px;
      padding: 0;
      color: #777;
      line-height: 50px;
      text-align: center;
      a {
        font-size: 16px;
      }
      &:hover {
        a {
          color: $mainColor;
        }
      }
      &.ant-anchor-link-active {
        background-color: $mainColor;
        a {
          color: #fff;
        }
      }
      &:nth-child(3) {
        left: 120px;
      }
      &:nth-child(4) {
        left: 240px;
      }
    }
    .scroll-order-btn {
      display: none;
      position: absolute;
      right: 15px;
      top: 8px;
      left: auto;
      height: 34px;
      line-height: 32px;
      background: linear-gradient(180deg, #fc7113, #fa500e);
      border: 1px solid #db4300;
      border-radius: 3px;
      font-size: 14px;
      & > a {
        width: 100%;
        color: #fff;
      }
      &:hover {
        a {
          color: #fff;
          text-decoration: underline;
        }
      }
    }
  }

  // popover
  .ant-popover-inner {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  }

  // date picker
  .ant-picker:hover,
  .ant-picker-focused {
    border-color: $mainColor;
    box-shadow: none;
  }
  .ant-picker-active-bar,
  .ant-picker-suffix {
    display: none;
  }
  .ant-picker-cell{
    color: rgba(0, 0, 0, 0.55);
  }
  .ant-picker-cell-in-view{
    color: rgba(0, 0, 0, 0.85);
  }
  .ant-picker-cell-disabled{
    color: rgba(0, 0, 0, 0.25);
  }
  // modal
  .no-footer {
    .ant-modal-footer {
      display: none;
    }
  }
  // message
  .ant-message {
    z-index: 1999;
    top: 40%;
  }
  // empty
  .ant-empty-normal .ant-empty-image{
    height: 70px;
  }
  .ant-empty-image{
    svg{
      width: 80px;
    }
  }
}

// 日历表
body.pop-datepicker {
  .ant-picker-decade-panel,
  .ant-picker-year-panel,
  .ant-picker-quarter-panel,
  .ant-picker-month-panel,
  .ant-picker-week-panel,
  .ant-picker-date-panel,
  .ant-picker-time-panel {
    width: 460px;
  }
  .ant-picker-date-panel .ant-picker-content {
    width: 100%;
  }
  .ant-picker-cell-disabled {
    cursor: not-allowed;
    pointer-events: all;
  }
  .ant-picker-cell-inner {
    padding: 0 3px 3px;
    width: 54px;
    height: 54px;
    font-size: 16px;
    & > p {
      margin: 0;
      font-size: 12px;
      line-height: 1.2;
    }
  }
  .ant-picker-cell::before {
    height: 54px;
  }
}
